{% load generic_tags %}
{% load analysis_tags %}

<h4>Process Tree</h4>
<ul>
{% for process in behavior.processtree|proctreetolist %}
    {% if process.startchildren %}
      <ul>
    {% elif process.endchildren %}
      </ul>
    {% else %}
      <li>
    <strong><a href="javascript:show_tab('process_{{process.pid}}');">{{process.name}}</a></strong> {{process.pid}}
      {% if process.commandline %}
        <i>{{ process.commandline }}</i>
      {% endif %}
      {% if detections2pid|get_detection_by_pid:process.pid %}
        <i style="color:red">{{ detections2pid|get_detection_by_pid:process.pid }}</i>
      {% endif %}
     </li>
    {% endif %}
{% endfor %}
</ul>
